package com.ytjj.qmyx.supplychain.common.api;

/**
 * 枚举了一些常用API操作码
 * 
 */
public enum ResultCode implements IErrorCode {
    SUCCESS(200, "操作成功"),
    FAILED(500, "操作失败"),
    TOKEN_FAILED(405, "token校验失败"),
    VALIDATE_FAILED(404, "参数检验失败"),
    SIGN_FAILED(407, "签名校验失败"),
    IP_FAILED(406, "IP无效"),
    UNAUTHORIZED(401, "登录信息已过期，请重新登录！"),
    FORBIDDEN(403, "没有相关权限"),
    NO_PHONE(150, "请绑定手机号!"),
    NO_PRODUCT(644,"商品已下架"),
    NO_USER(150, "没有该用户"),
    NO_ADVERT(604,"商品已被抢购完了"),
    NO_FIND_PRODUCT(605,"商品不存在！"),
    ASSIST_EXIST(606,"该用户已存在助力单！或审核还没通过！"),
    ASSIST_ERROR(607,"助力单已失效！"),
    NOT_IS_NEW_USER_ERROR(608,"每个新用户只能助力一次！"),
    USER_MYSELF_ERROR(609,"请邀请小伙伴助力!"),
    HELP_SUCCESS_ERROR(610,"已助力成功等待出单!"),
    YOU_HELP_ERROR(611,"你已助力!"),
    YOU_TODAY_HELP_ERROR(612,"你今天已助力!"),
    SIGNATURE_ERROR(613,"签名失败!"),
    RECHARGE_ERROR(614,"充值失败！"),
    RECEIVE_OVER(617,"今日领取的补贴已经完了!"),
    NOT_USER_ADDRESS_ERROR(618,"请填写用户信息及地址信息!"),
    ASC(619,"团ID不能为空!"),
    PHONE_IS_ERR_FORMAT(620, "手机号格式错误！"),
    PHONE_RECHARGE_NOT_FOUND(704, "充值记录不存在！"),
    PHONE_RECHARGE_STATUS_ERR(700, "订单状态不正确！"),
    PHONE_RECHARGE_STATUS_SUCCESS(701, "已充值，不能发起退款！"),
    PHONE_RECHARGE_STATUS_PROCESS(702, "充值中，不能发起退款！"),
    PHONE_RECHARGE_STATUS_DEAD(703, "已退款，不能重复发起退款！"),
    ASSIST_EXISTS(621,"该用户已存在3笔助力单！或审核还没通过！"),
    EXE_FAILED(151, "正在执行 请勿重复操作！"),
    ;


    private long code;
    private String message;

    ResultCode(long code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public long getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
